<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>瓜朋网Admin管理平台--达人管理</title>
<link rel="stylesheet" type="text/css" href="/hdocs/admin/css/theme.css" />
<link rel="stylesheet" type="text/css" href="/hdocs/admin/css/style.css" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/hdocs/admin/css/ie-sucks.css" />
<![endif]-->
<script type="text/javascript" src="/hdocs/jquery/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/hdocs/admin/js/admin.js"></script>
<script type="text/javascript" src="/hdocs/admin/js/common.js"></script>
</head>
<body>
	<div id="container">
		#set ($menuIndex="account")
		#parse("/admin/inc/header.html")
		<div id="wrapper">
			<div id="content">
				<form action="/admin/darren/list.jsp">
					<table>
						<caption>达人管理</caption>
						<tr>
							<th>用户ID</th>
							<td>
								<input id="accountid" name="accountid" type="text" 
									onkeyup="this.value=this.value.replace(/\D/g,'')"  
									onafterpaste="this.value=this.value.replace(/\D/g,'')" value="$!accountid"/>
							</td>
							<th>Email</th>
							<td>
								<input id="email" name="email" type="text" value="$!email"/>
							</td>
							<th>推荐类型</th>
							<td>
								<select id="indexType" name="indexType">
									<option value="">---全部---</option>
									<option value="1" #if($!indexType == 1) selected #end>左边</option>
									<option value="2" #if($!indexType == 2) selected #end>右边</option>
									<option value="-1" #if($!indexType == -1) selected #end>不推荐</option>
								</select>
							</td>
							<td>
								<input type="submit" class="bt" value="查询"/>
							</td>
						</tr>
					</table>
				</form>
				<table>
					<thead>
						<tr>
							<th width="5%">用户ID</th>
							<th width="15%">邮箱</th>
							<th width="25%">擅长</th>
							<th width="10%">文章数</th>
							<th width="10%">问题数</th>
							<th width="25%">推荐到首页</th>
							<th width="10%">操作</th>
						</tr>
					</thead>
					#foreach( $darren in $darrenList)
					<tr>
						<td>$!darren.accountid</td>
						<td>$!darren.email</td>
						<td>$!darren.skilled</td>
						<td>$!darren.articles</td>
						<td>$!darren.attentions</td>
						<td>
							<a href="javascript:toUpdateIndexType($!darren.accountid,1);">左边</a>&nbsp;&nbsp;
							<a href="javascript:toUpdateIndexType($!darren.accountid,2);">右边</a>&nbsp;&nbsp;
							<a href="javascript:toUpdateIndexType($!darren.accountid,-1);">不推荐</a>
						</td>
						<td>
							<a href="#">取消达人</a><br/><br/>
							<a href="#">删除</a>
						</td>
					</tr>
					#end
				</table>
				<form id="pageForm" action="/admin/darren/list.jsp" method="post" style="float:right;">
					<input name="accountid" type="hidden" value="$!accountid"/>
					<input name="email" type="hidden" value="$!email"/>
					<input name="indexType" type="hidden" value="$!indexType"/>
					<input id="updateAccountid" name="updateAccountid" type="hidden" value=""/>
					<input id="updateIndexType" name="updateIndexType" type="hidden" value=""/>
					#parse("/admin/inc/pageControl.html")
				</form>
			</div>
			#parse("/admin/inc/sidebar.html")
		</div>
		#parse("/admin/inc/footer.html")
	</div>
</body>
</html>
<script type="text/javascript">
function toUpdateIndexType(accountid,indexType){
	$("#updateAccountid").val(accountid);
	$("#updateIndexType").val(indexType);
	$("#pageForm").attr("action","/admin/darren/recommendDarren.jsp");
	$("#pageForm").submit();
}
</script>
